package com.sqx.modules.health.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sqx.modules.health.entity.NcgWatch;
import com.sqx.modules.health.entity.NcgWatchAlarmInfo;
import com.sqx.modules.health.entity.NcgWatchLocationInfo;
import org.apache.ibatis.annotations.Select;

public interface NcgWatchMapper extends BaseMapper<NcgWatch> {

    void saveLocationInfo(NcgWatchLocationInfo locationInfo);

    void saveAlarmInfo(NcgWatchAlarmInfo alarmInfo);

    NcgWatchLocationInfo getLocationInfoId(String id);

    void setLocationInfo(NcgWatchLocationInfo locationInfo);

    NcgWatchAlarmInfo getAlarmInfoId(String id);

    void setAlarmInfo(NcgWatchAlarmInfo alarmInfo);

    @Select("select * from ncg_watch_locationinfo location where location.watchimei = #{imei} and location.id = #{id}")
    NcgWatchLocationInfo getLocationInfo(String imei, String id);
    @Select("select * from ncg_watch_alarminfo alarminfo where alarminfo.watchimei = #{imei} and alarminfo.id = #{id}")
    NcgWatchAlarmInfo getAlarmInfo(String imei, String id);
}
